QRCode Control Type
Description
The UX Component's QRCode control displays its value as a QR Code.
To place a QRCode control on a UX, select the control type from the toolbox.
The QRCode control is just like other data bound controls in that it has a .getValue() and .setValue() method. To display a QR code, you simply call the .setValue() method of the control. For example:
{dialog.object}.setValue('MYQRCONTROL_1','value to encode');
QRCodes - Xbasic
New methods have been added to Xbasic to generate QRCodes. The methods are:
::Qrcode::Creator::GenerateBmp(c text, c flags)
::Qrcode::Creator::GenerateBmpFile(c text, c filename, c flags)
::Qrcode::Creator::GenerateJpeg(c text, c flags)
::Qrcode::Creator::GenerateJpegFile(c text, c filename, c flags)
::Qrcode::Creator::GeneratePng(c text, c flags)
::Qrcode::Creator::GeneratePngFile(c text, c filename, c flags)
::Qrcode::Creator::GenerateRTF(c text, c flags, n width, n height)
The flags parameter can be set to 'L' (low), 'M' (medium), 'Q', or 'H' (high) to indicate the level of error correction in the generated QR Code.
For example, from the Interactive window:
dim svg as c svg = ::QRCode::Creator::GenerateSVG("http://www.alphasoftware.com","L") a5_show_html(svg)
To display a QR code in an Xdialog:
svg = ::QRCode::Creator::GeneratePngFile("http://www.alphasoftware.com","c:\myfiles\qr1.png","L") ui_dlg_box("QRCODE","{image=c:\myfiles\qr1.png}")
QRCodes - Layout Table Reports
Layout Table Reports now support printing any cell in the Layout Table that contains a text value as a QR code.
To print the contents of a cell as q QR code, simply check the 'Display QRCode for text in cell' property at the bottom of the 'Cell Contents' dialog box.
For example, here is a report showing customers in the sample Northwind database:
See Also